<template>
  <div style="display:flex;flex-direction: row;justify-content: space-between;background:rgb(84, 92, 100);">
    <div style="height:60px;font-size: 18px;font-weight: bolder;color: gold;line-height: 60px;padding-left: 24px; ">
      {{systemName}}
    </div>
    <div>
      <el-menu default-active=""
               background-color="#545c64"
               class="el-menu-demo"
               mode="horizontal"
               text-color="#ffffff">
        <el-menu-item>
          <el-dropdown trigger="click">
            <div style="height:100%;">
              <i class="el-icon-user"></i>
              <span style="color:#fff">超级管理员</span>
              <i class="el-icon-caret-bottom" />
            </div>
            <el-dropdown-menu>
              <el-dropdown-item @click.native="resetPass">
                <span style="display:block;">修改密码</span>
              </el-dropdown-item>
              <el-dropdown-item @click.native="logout">
                <span style="display:block;">退出系统</span>
              </el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
        </el-menu-item>
      </el-menu>
    </div>
  </div>
</template>

<script>
import router from "../../router";
export default {
  name: "TopMenu",
  data() {
    return {
      systemName: '店铺后台管理系统',
    }
  },
  methods: {
    //修改密码
    resetPass(){
      this.$router.push('/resetPwd')
    },
    //登出
    logout(){
      localStorage.setItem('adtoken','')
      this.$router.push('/login')
    }
  }
}
</script>

<style scoped>
</style>
